﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Runtime.Remoting.Messaging;
using System.Text;
using System.Threading.Tasks;
using System.Transactions;
using System.Windows.Forms;
using DatabaseCore;
using DatabaseCore.Dto;
using Eaktest;
using SystemCore;

namespace EakTest
{
    public partial class TransactionList : BaseForm
    {
        private TransactionDao transactionDao = new TransactionDao();
        private IList<tbl_Transaction> TransactionSource { get; set; }

        public TransactionList()
        {
            InitializeComponent();

            GetAllProductSummary();
            BindData();
        }

        #region Private method

        private void GetAllProductSummary()
        {
            TransactionSource = transactionDao.GetList();
        }

        private void ClearGridView()
        {
            //gvProductSummary.Rows.Clear();
            gvTransaction.DataSource = null;
        }

        private void BindData()
        {
            ClearGridView();

            gvTransaction.DataSource = TransactionSource;
        }

        #endregion

        private void btnSearch_Click(object sender, EventArgs e)
        {
            //string ProductCode = txtProductCode.Text;
            //string OrderNo = txtOrderNo.Text;

            //ProductSummarySource = transactionDao.GetProductSummary(ProductCode, OrderNo);
            //BindData();
        }

    }
}